package com.chatdating.mapper;

import com.chatdating.entity.LikeTag;
import org.apache.ibatis.annotations.*;

@Mapper
public interface LikeTagMapper {
    @Select("SELECT * from like_tag_form where user_id=#{userId} and tag_id=#{tagId}")
    LikeTag findOne(@Param("userId") int userId,@Param("tagId") int tagId);

    @Insert("insert into like_tag_form(user_id,tag_id,num) values (#{userId},#{tagId},#{num})")
    void insertLikeTag(@Param("userId") int userId,@Param("tagId") int tagId,@Param("num") int num);

    @Update("update like_tag_form set num=#{num} where user_id=#{userId} and tag_id=#{tagId}")
    void updateLikeTag(@Param("userId") int userId,@Param("tagId") int tagId,@Param("num") int num);
}
